function [f] = allfactors(x)
% allfactors  -  compute all the possible integer factors of x
% note that this is a grunge method...
%
f=[];
for i = 1:x
   if(rem(x, i) == 0)
      f = [f i];
   end;
end;
